package health

import (
	"fiberx/internal/global/response"

	"github.com/gofiber/fiber/v3"
)

func (c *ControllerV1) HealthCheck(ctx fiber.Ctx) error {
	res, err := c.health.HealthCheck(ctx)
	if err != nil {
		return response.RES.JSON(ctx, response.FAIL, response.WithMsg(err.Error()))
	}
	return response.RES.JSON(ctx, response.OK, response.WithData(res))
}
